home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / gnus / dgnushack.el.z / dgnushack.el
Encoding:
Text File  |  1998-05-21  |  2.4 KB  |  78 lines

  1. ;;; dgnushack.el --- a hack to set the load path for byte-compiling
  2. ;; Copyright (C) 1994,95,96,97 Free Software Foundation, Inc.
  3.  
  4. ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
  5. ;; Version: 4.19
  6. ;; Keywords: news, path
  7.  
  8. ;; This file is part of GNU Emacs.
  9.  
  10. ;; GNU Emacs is free software; you can redistribute it and/or modify
  11. ;; it under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; GNU Emacs is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. ;; GNU General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with GNU Emacs; see the file COPYING.  If not, write to the
  22. ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23. ;; Boston, MA 02111-1307, USA.
  24.  
  25. ;;; Commentary:
  26.  
  27. ;;; Code:
  28.  
  29. (fset 'facep 'ignore)
  30.  
  31. (require 'cl)
  32. (require 'bytecomp)
  33. (push "." load-path)
  34. (require 'lpath)
  35.  
  36. (defalias 'device-sound-enabled-p 'ignore)
  37. (defalias 'play-sound-file 'ignore)
  38. (defalias 'nndb-request-article 'ignore)
  39. (defalias 'efs-re-read-dir 'ignore)
  40. (defalias 'ange-ftp-re-read-dir 'ignore)
  41. (defalias 'define-mail-user-agent 'ignore)
  42.  
  43. (eval-and-compile
  44.   (unless (string-match "XEmacs" emacs-version)
  45.     (fset 'get-popup-menu-response 'ignore)
  46.     (fset 'event-object 'ignore)
  47.     (fset 'x-defined-colors 'ignore)
  48.     (fset 'read-color 'ignore)))
  49.  
  50. (setq byte-compile-warnings
  51.       '(free-vars unresolved callargs redefine obsolete))
  52.  
  53. (defun dgnushack-compile ()
  54.   ;;(setq byte-compile-dynamic t)
  55.   (let ((files (directory-files "." nil ".el$"))
  56.     (xemacs (string-match "XEmacs" emacs-version))
  57.     ;;(byte-compile-generate-call-tree t)
  58.     byte-compile-warnings file elc)
  59.     (condition-case ()
  60.     (require 'w3-forms)
  61.       (error (setq files (delete "nnweb.el" files))))
  62.     (while (setq file (pop files))
  63.       (when (or (not (member file '("gnus-xmas.el" "gnus-picon.el"
  64.                     "messagexmas.el" "nnheaderxm.el"
  65.                     "smiley.el")))
  66.         xemacs)
  67.     (when (or (not (file-exists-p (setq elc (concat file "c"))))
  68.           (file-newer-than-file-p file elc))
  69.       (ignore-errors
  70.         (byte-compile-file file)))))))
  71.  
  72. (defun dgnushack-recompile ()
  73.   (require 'gnus)
  74.   (byte-recompile-directory "." 0))
  75.  
  76. ;;; dgnushack.el ends here
  77.  
  78.